﻿#ifndef PST_DATAPOLARCOORDINATE_H
#define PST_DATAPOLARCOORDINATE_H

#include "DataModelPost.h"

namespace pst
{
    /// @brief 极坐标图显示设置
    class DataPolarCoordinate : public QObject
    {
        Q_OBJECT

    public:
        Q_INVOKABLE DataPolarCoordinate(QObject* parent = nullptr);
        ~DataPolarCoordinate();

        void copyData(const DataPolarCoordinate* data);

        void setAngleAxisDisplay(Style2D_Axis* data);
        Style2D_Axis* getAngleAxisDisplay() const;

        void setAngleAxisRange(Style2D_AxisRange* data);
        Style2D_AxisRange* getAngleAxisRange() const;

        void setRadiusAxisDisplay(Style2D_Axis* data);
        Style2D_Axis* getRadiusAxisDisplay() const;

        void setRadiusAxisRange(Style2D_AxisRange* data);
        Style2D_AxisRange* getRadiusAxisRange() const;

        void setGrid(Style2D_GridLine* data);
        Style2D_GridLine* getGrid() const;

        void setTitle(Style2D_Title* data);
        Style2D_Title* getTitle() const;

        void setLegend(Style2D_Legend* data);
        Style2D_Legend* getLegend() const;

        void setDataProperty(Style2D_DataProperty* data);
        Style2D_DataProperty* getDataProperty() const;

    private:
        Style2D_Axis* m_angleAxisDisplay;     // 角度轴显示
        Style2D_AxisRange* m_angleAxisRange;  // 角度轴范围
        Style2D_Axis* m_radiusAxisDisplay;    // 半径轴显示
        Style2D_AxisRange* m_radiusAxisRange; // 半径轴范围
        Style2D_GridLine* m_grid;             // 网格线
        Style2D_Title* m_title;               // 标题
        Style2D_Legend* m_legend;             // 图例
        Style2D_DataProperty* m_dataProperty; // 数据属性
    public:
        int indexOfGraph{-1};
    };
} // namespace pst
#endif // PST_DATAPOLARCOORDINATE_H
